<template>
  <div class="home-container">
    <div class="welcome-card">
      <h2>欢迎使用 PocketBase Vue3 用户管理系统</h2>
      <p class="description">
        这是一个基于 Vue 3 和 PocketBase 构建的用户管理系统演示应用。
        您可以注册新账户、登录现有账户，并查看所有已注册用户的信息。
      </p>
      
      <div class="features">
        <h3>功能特性</h3>
        <ul>
          <li>✅ 用户注册与邮箱验证</li>
          <li>✅ 用户登录与身份认证</li>
          <li>✅ 查看所有已注册用户列表</li>
          <li>✅ 响应式设计，支持移动端</li>
          <li>✅ 实时数据同步</li>
        </ul>
      </div>
      
      <div class="actions">
        <router-link to="/login" class="btn btn-primary">
          立即登录
        </router-link>
        <router-link to="/register" class="btn btn-secondary">
          注册账户
        </router-link>
      </div>
    </div>
    
    <div class="tech-stack">
      <h3>技术栈</h3>
      <div class="tech-items">
        <div class="tech-item">
          <strong>Vue 3</strong>
          <span>前端框架</span>
        </div>
        <div class="tech-item">
          <strong>TypeScript</strong>
          <span>类型安全</span>
        </div>
        <div class="tech-item">
          <strong>PocketBase</strong>
          <span>后端服务</span>
        </div>
        <div class="tech-item">
          <strong>Vue Router</strong>
          <span>路由管理</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
// 首页组件，无需特殊逻辑
</script>

<style scoped>
.home-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.welcome-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.welcome-card h2 {
  color: #333;
  margin-bottom: 1rem;
  font-size: 2rem;
}

.description {
  color: #666;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.features {
  text-align: left;
  margin-bottom: 2rem;
}

.features h3 {
  color: #333;
  margin-bottom: 1rem;
  text-align: center;
}

.features ul {
  list-style: none;
  padding: 0;
}

.features li {
  padding: 0.5rem 0;
  color: #555;
  font-size: 1rem;
}

.actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: #007bff;
  border-color: #007bff;
}

.btn-secondary:hover {
  background-color: #007bff;
  color: white;
  transform: translateY(-1px);
}

.tech-stack {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

.tech-stack h3 {
  color: #333;
  margin-bottom: 1.5rem;
  text-align: center;
}

.tech-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.tech-item {
  text-align: center;
  padding: 1rem;
  border: 1px solid #eee;
  border-radius: 8px;
  transition: box-shadow 0.2s;
}

.tech-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tech-item strong {
  display: block;
  color: #333;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.tech-item span {
  color: #666;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .home-container {
    padding: 1rem;
  }
  
  .welcome-card {
    padding: 1.5rem;
  }
  
  .welcome-card h2 {
    font-size: 1.5rem;
  }
  
  .actions {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 200px;
  }
  
  .tech-items {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}
</style>
